Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”...
Given a 2D square matrix, find the sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix....
Given a 2D square matrix, find the sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix....
Given a string, the task is to reverse the order of the words in the given string....
Given an array, the task is to find average of that array. Average is the sum of array elements divided by the number of elements....
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”...
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”...
In C, the whole array cannot be passed as an argument to a function. However, you can pass a pointer to an array without an index by specifying the array’s name....
Given a 2D square matrix, find the sum of elements in Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix....
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”...
Array reverse or reverse a array means changing the position of each number of the given array to its opposite position from end, i.e. if a number is at position 1 then its new position will be Array.length, similarly if a number is at position 2 then its new position will be Array.length – 1, and so on....
C++ is a widely used Object Oriented Programming language and is relatively easy to understand. The “Hello World” program is the first step towards learning any programming language and is also one of the most straightforward programs you will learn....